<template>
    <nav id="navbar" class="nav">
        <ul class="nav-list">
            <li class="topic-head"> 
                <router-link to="/">
                <p id="topic">链 求 君 | Blockchain</p>
                </router-link>
            </li>
            <li> 
                <router-link to="/learn">教程</router-link>
            </li>
            <li>
                <router-link to="/todo">实践</router-link>
            </li>
            <li> 
                <router-link to="/linker">资源</router-link>
            </li>
        </ul>
    </nav>
</template>

<style scoped>
.topic-head {
    position: absolute;
    left:0;
    top:0;
  
}
 
#navbar {
    background: #3F51B5;
}

.nav {
    /* 居中 */
    display: flex;
    justify-content: flex-end;

    /* 位置固定 */
    position: fixed;
    left:0;
    top:0;
    width: 100%;

    /* 阴影效果 */
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);

    /* 层叠效果 数值越大覆盖越上层 */
    z-index: 10;
}


.nav-list {
    /* 标题弹性布局样式 */
    display: flex;
    margin-right: 3rem;
}
.nav-list a {
    /* 标题字体调整间距大小 */
    display: block;
    font-size:  1.3rem;
    padding: 2rem;
    font-weight: bold;
}


.nav-list a:hover {
    /* 鼠标悬浮变色效果 */
    background: #303F9F;
    
}
 
#topic {
    font-weight: bold;
}
 

</style>
